<template>
	<view class="tui-userinfo-box">
		<tui-list-cell padding="0">
			<view class="tui-list-cell">
				<view>用户名</view>
				<view class="tui-content">{{userinfo.username?userinfo.username:'用户名'}}</view>
			</view>
		</tui-list-cell>
		<tui-list-cell padding="0"  >
			<view class="tui-list-cell">
				<view>手机号</view>
				<view class="tui-content">{{userinfo.mobile?userinfo.mobile:''}}</view>
			</view>
		</tui-list-cell>
		<tui-list-cell padding="0"  >
			<view class="tui-list-cell">
				<view>昵称</view>
				<view class="tui-content">{{userinfo.nickname?userinfo.nickname:''}}</view>
			</view>
		</tui-list-cell>
		<tui-list-cell padding="0"  unlined >
			<view class="tui-list-cell">
				<view>职位</view>
				<view class="tui-content">{{userinfo.type_name}}</view>
			</view>
		</tui-list-cell>
		<tui-list-cell padding="0"  unlined >
			<view class="tui-list-cell">
				<view>邮箱 </view>
				<view class="tui-content">{{userinfo.email}}</view>
			</view>
		</tui-list-cell>
		<tui-list-cell padding="0"  unlined >
			<view class="tui-list-cell">
				<view>店铺 </view>
				<view class="tui-content">{{userinfo.branch}}</view>
			</view>
		</tui-list-cell>
		</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo:[],
				size: 26,
				isCancel: true,
			}
		},
		onShow() {
			let it =this;
			this.tui.chkAuth();
			this.tui.request('user/api/getuser','GET').then(function(res){
				if(res.code == 1){
					it.userinfo = res.data;
				}else{
					it.tui.toast(res.msg)
				}
			})
		},
		methods: {
			href(page) {
				this.tui.openPage(page);
			},
		}
	}
</script>

<style>
	.tui-userinfo-box {
		margin: 20rpx 0;
		color: #333;
	}

	.tui-list-cell {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 24rpx 60rpx 24rpx 30rpx;
		box-sizing: border-box;
		font-size: 30rpx;
	}

	.tui-pr30 {
		padding-right: 30rpx;
	}

	.tui-avatar {
		width: 100rpx;
		height: 100rpx;
		display: block;
		border-radius: 100rpx;
	}

	.tui-content {
		font-size: 26rpx;
		color: #666;
	}
</style>
